1. Field of the Invention
The disclosure relates generally to an improved data processing system, and, in particular, to a method and apparatus for processing communications. Still more particularly the present disclosure relates to a method and apparatus for managing connection failover in a load balancer.
2. Description of the Related Art
The Internet is a system of interconnected public and private computer networks. Computing devices communicate with each other over the Internet using a number of Internet protocols. These Internet protocols identify the computing devices and other resources on the Internet using Internet Protocol (IP) addresses and port numbers. Some Internet protocols, such as Transmission Control Protocol/Internet Protocol (TCP/IP), require the establishment of a connection for the communications. For example, after establishing a connection to a resource for a computing device, the computing device may then send requests for information from the resource, send information to the resource, and send a command terminating the connection with the resource. One valuable feature of Internet protocols is that a failure of an intermediate portion of a network will not prevent communications from getting to their destination, as long as there is an alternate path through the network.
In some computing environments, use of a resource is distributed across a group of computing devices by a load balancer. Load balancers manage communications between clients and resources. For example, when a client computer sends a request to establish a connection with a resource, a load balancer may intercept the connection. In this example, the load balancer, which is not an endpoint in the connection, responds to the connection request by selecting a particular computing device in a group of computing devices to handle the connection. In this example, the load balancer stores these connections to device mappings in a table that is used by the load balancer to route subsequent communications between client computers and the group of computing devices.
Situations may arise where a load balancer has to take over for another load balancer. For example, a planned outage or an unplanned outage of what was a previously active load balancer of a group of resources may result in the start of a process for an alternate load balancer taking over for the previously active load balancer. As with the previous load balancer, the alternate load balancer also needs a mapping table to route communications. The mapping tables of different load balancers are typically located in different data processing systems. If a resource or load balancer receives a communication for a connection that it does not have knowledge of, the typical behavior is to reply to the communication with a connection reset or to discard that communication. The connection reset tells the sender of the communication that the receiver does not know how to handle the communication and the connection should be aborted. Sending a connection reset exposes the situation to the sender of the communication. Exposing the situation is un-desirable in many computing environments.
Therefore, a process is needed for synchronizing the mapping tables of the active and alternate load balancers. One solution is to actively synchronize changes between the mapping tables. However, actively synchronizing mapping table changes while the load balancers are processing communications can result in unsatisfactory results. For example, for short lived connections it would be un-desirable to delay creation of connections made by an active load balancer until the connections have been replicated to an alternate load balancer. Similarly, it is also undesirable to process communications while mapping tables are incomplete or out of date due to delayed synchronization of mapping table changes.
Therefore, it would be desirable to have a method, apparatus, and computer program product that takes into account at least some of the issues discussed above.